Table of Contents

Maguma WorkBench

Table of Contents
  • Overview
  • Getting Started
  • Menubar
    • File
    • Edit
    • View
    • Run & Debug
    • Projects
    • Tools
    • Window
    • Help
  • Class Browser
  • CVS Manager
  • FileManager
  • Remote Browser
  • Snippets
  • Workspace (Project Manager)
  • Class Wizard
  • Regular expressions
  • Editor Window
  • Debugging PHP Scripts
  • Tools->Options (Configuration)
    • CVS Manager
    • Debugging
    • Editor
    • AutoComplete
    • Colors
    • External Browsers
    • File Extensions
    • General/Locale
    • Modules
    • Multiview Panel
    • PHP Parsing
    • Server Settings
    • PHP Interpreter
    • Remote Servers
    • Themes
  • Other features


[ << previous ] [ index ] [ next >> ]

Overview

Maguma Workbench is the source-level editor tool of the Maguma Enterprise Suite, enabling the developer and development team to enhance their productivity.

Maguma Workbench enables developers to code more efficiently by utilising all the enhancements available over ordinary file editors such as a project manager, function overviews, integrated previews using a custom webserver or ordinary html views, robust debugging, rapid code completion and an advanced customisable gui interface.

[ << previous ] [ index ] [ next >> ]

© 2004, Maguma GmbH, All Rights Reserved
All content provided in this document belongs to Maguma unless noted as the property of another company, institution or person.
Reproduction is not allowed without consent by a representative of Maguma GmbH. Please contact info@maguma.com with any queries.


Getting Started

Workbench::Getting Started

After Installation

After you have installed Workbench for the first time you will want to setup your PHP Parsing first. To do this click on the Tools menu and select "Options" from the pulldown.

Once the Preferences dialog has opened select the option in the tree on the left for PHP Parsing. If you want to use a local PHP installation (for example the PHP that was included with the installation package) you will want to select "Calling the local PHP CGI Interpreter directly". Otherwise if you would like to use a webserver for the parsing the correct choice would be "Using an existing web server (local or remote)".

If you chose option #1 (PHP CGI) then you will next want to click on the tree option for PHP Interpreter and click on the "Browser" button to find the location of php.exe. If you installed PHP with Maguma Workbench then you would typically find it located in C:\Program Files\Maguma Workbench\php\.

If you have chosen to use a local or remote web server then you will want to click on the preferences option "Server Settings" and define the location of the document root for files to be parsed and the protocol, hostname and possibly url path (i.e. http://localhost/)

Once you have chosen your settings you can click on the "OK" button to save these settings and return to Workbench.

This document is still under development...updates will be announced

[ << previous ] [ index ] [ next >> ]


Menus

  • File
  • Edit
  • View
  • Run & Debug
  • Projects
  • Tools
  • Window
  • Help


File

Menubar::File

New -- Opens a new blank file in the editor pane without raising a dialog.

New in project -- Allows you select a file and add it to the currently open project.

Open... -- Opens the system's file dialog, select a file, click OK and the file will be opened in the editor pane.

Open Remote file... -- Opens the above dialog which allows you to double click a remote FTP or SFTP server, select a file then click OK to open the file into the editor pane.

Close -- Closes the active file in the editor pane.

Close All -- Closes all opened files, if a file has been modified from the version on disk it will prompt the user to save before closing, if the file is new it will open a Save As... dialog box if you wish to save the file.

Save -- Saves the currently selected file in the editor pane, if the file has not been given a name previously the Save As dialog will be opened allowing you to save the file under a specific name.

Save As -- Opens the Save As... dialog box which allows you to save a currently open file under a different name.

Save All -- Saves all the currently open files that have already been saved with filenames, it will open a Save As... dialog box if the files have not been saved before allowing you to give it a filename.

Save to Remote -- Opens the above dialog which allows you to double click a remote FTP or SFTP server, select a file then click OK to save the current file in the editor pane.

Print Setup -- The Print setup menu displays the following submenus:

  • Page Setup -- Brings up the following dialog that allows the user to setup the basic page properties such as margins, orientation and paper.

  • Printer Setup -- Bring up the default printer setup dialog as offerred by the operating system.

Recent Files -- Opens whichever recently used file you have single clicked into the editor pane without raising a dialog.

Recent Projects -- Opens whichever recently used project you have single clicked into the editor pane without raising a dialog.

Exit -- Completely exits the program.


Edit

Menubar::Edit

Undo -- Reverts the active window to the previous state before the last action.

Redo -- Applies the last action that was undone from the current file in the editor pane.

Cut -- Cuts the selected portion from the current file in the editor pane to the clipboard so you can paste it back with a ctrl-V or similar command.

Copy -- Copies the selected portion from the current file in the editor pane to the clipboard so you can paste it elsewhere with a ctrl-V or similar command.

Paste -- Pastes the current portion of text/graphics that is in the clipboard's memory to the selected part of the current file in the editor pane.

Copy append -- Copies the selected portion from the current file in the editor pane to the clipboard appending the Copied item to itself for pasting. For example, if you selected the word 'double' and did a Copy Append, the original word 'double' would be copied and by pasting on another line you would get 'doubledouble'.

Cut append -- Cuts the selected portion from the current file in the editor pane to the clipboard appending the Cut item to itself for pasting. For example, if you selected the word 'double' and did a Cut Append, the original word 'double' would be copied and by pasting on another line you would get 'doubledouble'.

Select All -- Selects all lines in the currently opened file in the Code Editor window.

Find ... -- Opens the above dialog where you can search the currently opened file in the Code Editor window for various options and directions based on a search string entered into the Search For ... box by clicking on Find.

Find Next ... -- Pushing F3 (the hotkey for Find Next) Workbench searches on your supplied search term and displays the first highlighted match to your search term. To find the next item that matches your search term you can either click on the Find button in the above dialog box, or close the dialog box and hit F3.

Find Previous... -- Pushing F3 (the hotkey for Find Next) Workbench searches on your supplied search term and displays the first highlighted match to your search term. To find the previous item that matches your search term you would utilize the Ctrl-F3 hotkey. A tip here would be to enter the search term into the dialog. Close the dialog and then use the F3 / Ctrl-F3 dialog to go through your entire file searching rapidly for the search term.

Find in files... -- Pushing ctrl+shift+F (the hotkey for Find in files) Workbench searches on your supplied search term in all the files opened in the editor pane and displays the Find in files dialog box to display the result. It also highlights the match in the corresponding files.

Replace ... -- Clicking Replace... from the menu opens the above dialog which allows for the searching and replacing of a search term when found in the current document in the Code Editor window. As above you can search forwards or backwards by selecting whichever radio button under the Direction area of the window.

Replace in files... -- Clicking Replace in files... from the menu opens the above dialog which allows for the searching and replacing of a search term when found in several documents cuurently open in the editor. It allows you to specify the files, on which the search is to be performed, mask files(.html,.php, etc.), the project name, where the search is to be performed on the specified files. It also allows you to select one of the following options:

  • Whole Words -- Allows you to search for the whole word.

  • Word start -- Allows you to search for a match that starts with the first letter of the searched item.

  • Case sensitive -- It determines a acse sensitive or case insensitive search.

Search Where section allows to select one of the following options:

  • Open Files -- Allows you to perform the search only on open files.

  • Directory -- Allows you to specify a directory, where the search is to be performed.

  • In Selection -- Allows you to perform the search only within a selection in a particular file.

  • In Project Files -- Allows to perform the search with a set of Project files.

Go to line... -- This option brings up a small dialog which asks for a line number, when supplied and OK is clicked, the cursor is taken to that line in the current open document.

Select Current Element... -- Highlights the current element of a class the cursor is contained in currently.

Select Current Element Parent... -- Will select the class that a particular function or variable is a member of.

Invoke Autocompletion -- Auto-completion is a function where a token is custom defined by the user that will be expanded when the hot-key (shift-space by default) is pressed. This feature is not dependant on the script that is currently being edited, it is not dependant on the namespace the cursor currently resides in, it is fully global in any file being edited. Please see more explanation of Auto-completion under the Editor section of this manual.

Invoke Codecompletion -- Code-completion is one of the tools that is common to most development tools. Using a few keystrokes to start the name of the function call, a hot-key can be pressed (ctrl-space by default) that will bring up a listbox positioned underneath the cursor which shows the current matches to the list of known functions. Please see more explanation of Code-completion under the Editor section of this manual.

Bookmarks - Numbered -- The above menu shows the options available with this feature. To insert a bookmark either just have your cursor on the line you want bookmarked or have a region of text selected. Click the Toggle bookmark 1 button and you will see a bookmark appear in the margin on that line. It should look like the following blue numbers in the left margin of this screenshot.

You can then move your cursor to that bookmark from anywhere in the file by either clicking the Goto bookmark 1 option in the above menu or by using the hotkey (in our case Ctrl-1).

Bookmarks - Flagged -- The above menu shows the options available with this feature. To insert a bookmark either just have your cursor on the line you want bookmarked or have a region of text selected. Click the Toggle bookmark flag button and you will see a bookmark appear in the margin on that line. It should look like the following blue shape in the left margin of this screenshot. You can then move your cursor to that bookmark from anywhere in the file by using the hotkey of F2 to go to the next bookmark in the current open file.

Comment out current line -- Inserts the "//" comment token to the beginning of the current line.

Comment out current section -- Insert the begin and ending comment block tokens "/* */" around the current selected text.

Sort lines -- This applies a basic alphanumeric sort to all the lines of the file. Case is compared along with leading characters.


View

Menubar::View

Language Mode -- Change the lexer for the current file, the choices offerred here come from the defined lexer engines in highlighters.xml. (Note: HTML supports HTML, PHP, and Javascript highlighting)

Preview as HTML in internal browser... -- Previews the current file in an internal browser window which displays HTML 4.1. Use the F7 and the F6 keys (see below) to quickly toggle between your code and a live preview.

Show Code Editor window -- When in the internal preview, this button will display the Code Editor window.

Word Wrap -- Clicking this option toggles the word wrap of the Code Editor window on and off.

Parse and preview in system browser... -- Opens up the system web browser and tries to display the PARSED php page.

Preview as HTML in system browser... -- Opens up the system web browser and displays the UNPARSED php page as html.

External browsers -- If you have installed another (external) browser via the Tools => Options dialog box, you can display the page in the external browser from here.

Clear Message Window -- Pressing ctrl+F8 clears the debugging message window at the bottom of the screen.


Run

Menubar::Run

Run to Internal -- Parse the script and display with the internal preview pane.

Run to External -- Parse the script and display with external browser (selectable via submenu.)

Run and Redirect -- Parse the script and save output to a file on the local filesystem, does not display results.

Script Parameters -- Add parameters for use when parsing with the defined webserver.

###

Start Debug -- Parses the current file through the debugging window at the bottom of the Code Editor.

Run to Cursor -- Execute the script to the line where the cursor it at currently, will ignore any other breakpoints that are already set.

Step into -- Follows the code into the current line's function call.

Step over -- Step to the next line of code in the current file, do not follow execution into any function calls.

Step out -- Finishes with the current scope and moves to the scope above, jumps out of the current function call

Stop script -- Stops the current debugging operation in debugging window at the bottom of the Code Editor.

###

Set/Clear breakpoint -- Toggle the current line on or off as a breakpoint.

Clear all breakpoints -- Remove all breakpoints in the current file.

###

Add watch -- Adds a variable to the watch window to be observed in debugging at the bottom of the screen.

Remove watch -- Removes a variable from the watch window at the bottom of the screen.

Remove all watches -- Removes all variables from the watch window at the bottom of the screen.


Project

Menubar::Project

Create new workspace -- This option creates a new project, that can track multiple files without physically moving them from their original location.

Load project... -- Allows you to open an .xpj (workbench project) file that you have previously saved.

Import Project from 2.0.x... -- Allows you to import project (created in version 2.0.x) locally or from a remote location. The actual project does not change its actual position.

Save project... -- Allows you to save the currently opened project.

Save project As... -- Opens up the Save Project As dialog box, that Allows you to save the currently opened project in a different name.

Add physical directory... -- Allows to add a physical directory to your workspace, which has an existence in your hard disk.

Add folder to current project... -- This option adds a physical folder to a project to enable tracking of the files within it.

Add file to virtual folder... --This is a unique feature of the workspace. It allows you to add a file to a viurtual directory ( a directory, which although is visible in the workspace, but does not have any physical existence in your hard disk).

Add remote file to virtual folder... --This is also a unique feature of the workspace. It allows you to add a file from a remote locaton (FTP or SFTP server) to a viurtual directory ( a directory, which although is visible in the workspace, but does not have any physical existence in your hard disk).

Remove selection -- This option removes the selected file/folder that you have selected in the Workspace tab on the right side of the Code Editor window.

Refresh physical folder -- Allows you refresh the selected physical folder and all the subfolders and files within it.


Tools

Menubar::Tools

Regular Expression -- Clicking on it opens up the Regular Expression dialog box, where you can search for a particular pattern. For more information Click here.

PHP Class Wizard -- Clicking on it opens up the Class Wizard dialog box, where you can define PHP classes, member variable and member functions within it. For more information Click here.

PHPDoc comment -- Allows you to insert comments to your currently open PHP script.

Interactive PHPDoc comment -- Allows you to insert interactive comments to your currently open PHP script. This interactive comments helps the developer understand the code written by him or any others.

Find matching brace -- Allows you to find a matching brace withing a block the cursor is residing in.

PHP Block -- This menu item helps inserting the one of the three delimiters in the currently open PHP script:

  • Insert <? ?> -- Inserts the mentioned block delimiter in the currently open PHP script.
  • Insert <?php ?> -- Inserts the mentioned block delimiter in the currently open PHP script.
  • Insert <?script php ?> -- Inserts <script language="php"> <?php ?> </script> into the script at the current position.

Line Feeds(EOLs) -- Sets the line ending characters to the selected combination, for DOS/Windows it will use the \r\n (CR-LF) when the file is saved, \n for Unix(LF) and \r for MacOS(CR). This will force the EOL characters no matter what OS you are currently operating on.

Tabs to Spaces -- Will convert all [TAB] characters in the current script to the number of spaces represented by a tabstop (see Editor settings for information on setting this value.)

Spaces to Tabs -- Will convert all groups of spaces matching the tabstop (by default 4) into [TAB]

Make selection upper case -- Clicking on it or pressing Alt+U converts the currently selected text to uppercase (A-Z).

Make selection lower case -- Clicking on it or pressing Alt+L converts the currently selected text to lowercase (a-z).

Escape selection -- Clicking on it or pressing Alt+Shift+E inserts '\' (backslash) in front of quotes inside a string.

Insert escaped string... -- Allows you to enter astring in a dialog box, which gets appended to your script at the current cursor position.

Options -- Shows the preferences dialog.


Window

Menubar::Window

Next edit window -- Makes the edit window to the right of the current window active, or if at the right-most open file it will move to the first editor.

Previous edit window -- Makes the edit window to the left of the current window active, or if at the left-most it will make the right-most active.

Toolbar.* -- All window menu items starting with the word "Toolbar" represent the tool, that toggles the associated window shown/hidden status. This list can change depending if tools are docked into the Multiview Panel.


Help

Menubar::Help

Workbench Help... -- Clicking this item or pressing Shift+F1 brings up Workbench's help file.

Php Help... -- Clicking this item or pressing Alt+F1 brings up workbench's Php Help file, the Php manual.

Look up current word in Php Help... -- Clicking this item or pressing F1 opens the Php manual to a reference to the word you highlighted before you clicked this option.

HTML 4.0 Help... -- The item brings up workbench's HTML 4.0 Help file.

Look up current word in HTML Help... -- This item opens the HTML manual to a reference to the word you highlighted before you clicked this option.

CSS Help... -- The item brings up workbench's CSS Help file.

Look up current word in CSS Help... -- This item opens the CSS manual to a reference to the word you highlighted before you clicked this option.

Tip of the Day... -- Displays the Tip of the Day as shown below.

Check for Updates... -- Allows you to check the updated version of workbench.

About... -- This tells you about Studio, including what version of the product you have.


Class Browser

The Class Browser displays the results from the code parsing thread. A tree format that starts at the root, branches into files which branch into three parts: included Global variables, files, functions and classes. This Includes references to the Global variables, files included and functions dead end at this branch, while classes branch again showing the member variables and member functions that belong to classes. Selecting a particular file shows up Global variables, functions and classes, which contain member variables, member fuctions, which in turn displays local variables. Double-clicking on an entry of the Class Browser will select the reference that defines this member in the editing window.

The icons that show up in above, denote the followings:

-- Denotes a variable( Global or Local).

-- Denotes a class file or a class exception .

-- Denotes a php file.

-- Denotes a public class function.

-- Denotes a private class variable.

The toolbar at the top of the Class Browser has the following buttons (from left to right):

button -- Sort by code in file.

button -- Sort alphabetically.

button -- Sort categorically.

button -- Toggle incremental search.

The first three buttons are self-explanatory,i.e, sort by code, sort by alphabetical order and sort categorized whereas, the last button needs a bit more. The "Incremental Search" function opens a text input field below the toolbar and above the tree display, this can be used to jump to the first occurrence of the search token. The display will highlight the match as the user types and will move the tree so that the match is shown in bold in the tree display.


Workspace

This module is available only with the Toolkit. This one is optional.

The Workspace is a tool for managing projects.

It supports the functionality of adding new projects, loading existing projects (local or remote), importing projects either locally or from a remote location, saving projects and removing projects. It also supports the functionality of adding a physical directory ( a directory, that is present physically in your hard disk) and all the subdirectories and files under it. Another supported functionality is adding a virtual directory ( a directory that is abstract, i.e, it does not have a physical existence in your hard disk). This virtual directory provides a virtual location into which files can be added and stored. Double clicking a file located under a physical or a virtual directory opens it up in the editor. Removing a file in the workspace removes it from the workspace window only, it does not remove it from its physical location.

Overall, this tools comes handy for organising the projects, folders or files irrespective of their physical location.

The toolbar at the top of the Workspace has the following buttons (from left to right)

  • button -- Adds a new project to workspace.

  • button -- Adds a new or existing folder to the project.

  • button -- Adds a new or existing folder or a file to the workspace.

  • button -- Removes a selected item from the workspace. It does not remove the item physically.

  • button -- Imports an already existing folder (local or remote) into the workspace. If the folder does not exist, a new folder is created.

  • button -- Refreshes all imported folders.

Selecting and right clicking a particular folder or file or right clicking on a blank space in the workspace, shows up the following popup menus:

The Project popup menu

The New Project popup menu opens up a Create new Project... dialog box, where you can specify a new project name and the root directory of the project files.

The Load Project popup menu opens up a Load Project dialog box, where from you can choose one existing project and load it in to the workspace.

The Import Project from 2.0.x popup menu allows you to import project (created in version 2.0.x) locally or from a remote location. The actual project does not change its actual position.

Right clicking on a project in the workspace displays the following popup menus:

The Project popup menu

The New Project popup menu opens up a Create new Project... dialog box, where you can specify a new project name and the root directory of the project files.

The Load Project popup menu opens up a Load Project dialog box, where from you can choose one existing project and load it in to the workspace.

The Import Project from 2.0.x popup menu allows you to import project (created in version 2.0.x) locally or from a remote location. The actual project does not change its actual position.

The Save Project popup menu allows the save the current project on which, the work is going on, in a new name.

The Save Project As popup menu allows you save the current project in a different name.

The Remove Project popup menu allows to you select and remove a project from the workspace. But, it does not remove it from the original location in your hard disk.

The Add Physical Directory... popup menu allows to add a physical directory to your workspace, which has an existence in your hard disk.

The Add Virtual Directory... popup menu is a unique feature of the workspace. It allows you to add a viurtual directory ( a directory, which although is visible in the workspace, but does not have any physical existence in your hard disk) to your workspace, where you can keep, create project, files and folders and remove therefrom.

The Refresh Project popup menu refreshes the projects and its folders and files, included within.

The Project Properties popup menu opens up a Project Properties dialog box, that describes File Path,the Date on which the file was last modified, the Root directory of the file and a URL to the file.


Editor

The editing window is the main part of the GUI around which all other features are drawn. Being a source-level editor, Workbench speeds up the process of writing code by having features such as Syntax Highlighting, Code-completion, Auto-completion and Code-folding. The Editing component of Workbench is based on the mature code of Scintilla, an embedded library in wxWidgets.

Syntax Highlighting

Using different colors to represent the typical identifiers in the editing window allows the developer to quickly identify mistakes such as open strings, unknown function calls and misplaced brackets. Colors are set to a default the first time the program is run, and if no changes are made there will be no settings saved. Otherwise the user will be able to click on the Options dialog and select any system color available from the palette. Once changes are made they will be saved to the users settings.xml file.

You can view the Color Settings section of this manual to discover how to set your own colors rather than the default that Workbench is shipped with.

Note: The grey line on the right side of the edit window represents the right edge set in your preferences, by default this value is set to 80.

Code-completion

Code-completion is one of the tools that is common to most development tools. Using a few keystrokes to start the name of the function call, a hot-key can be pressed (ctrl-space by default) that will bring up a listbox positioned underneath the cursor which shows the current matches to the list of known functions. This list of known functions will be derived from the internal PHP functions (see the online documentation at www.php.net) combined with the functions defined in the current script and the functions defined in any scripts that are included. If the token where the cursor is positioned with, begins with the '$' symbol, the list of variables within the current namespace is used to define the matchlist shown in the listbox.

Auto-completion

Before | After

Auto-completion is a function where a token is custom defined by the user that will be expanded when the hot-key (shift-space by default) is pressed. This feature is not dependant on the script that is currently being edited, it is not dependant on the namespace the cursor currently resides in, it is fully global in any file being edited.

The default hotkey for invoking Auto-completion is CTRL-J (previous in Maguma Studio it was SHIFT-SPACE). In the images above you can see it using one of the default auto-complete tokens installed with Workbench. In the "Before" image, the user types "classd" and then with the cursor positioned directly after the word hits CTRL-J which turns the token into the code that you see in the "After" image.

You can view the Auto Completion settings section to understand how to define your own auto-completion tokens and content.

Code Folding

One of the features that was first introduced in emacs was the ability to collapse a section of a file delimited by tokens and sort of "hide" it from the current view. For example if you have a large amount of functions defined at the beginning of your script but continously scroll between the top and the bottom in your current view you could "fold" the lines in between to shorten the amount of travel between sections. You could also use this feature to hide the finished code away from what you are concerned with at the moment.

For example:

becomes

as you can see the line numbers for the following lines are not affected in any manner, and the symbol next to the first line has become the '+' to represent that it is folded code. This is an automatic features built into the lexer as part of Scintilla and the only programmatic steps are creating the editor window with the secondary gutter space for the folding icon.


File Browser

This module is available only with the Toolkit.

The File Browser panel consists of three parts, topmost is the volume/directory listing as a treeview. Below that is the filter list for the associated file types. At the bottom is the actual file list which will display the filenames and their sizes.

Using the '+' and '-' in the directory display you can expand and collapse the respective directory branch. Double-clicking on the directory itself will select that directory for display in the fileview. Right clicking on a directory lists the following popup menus :

  • Create subdirectory -- Creates a subdiectory under the currently selected directory.
  • Delete subdirectory -- Deletes a subdirectory under the currently selected directory.
  • Rename subdirectory -- Renames a subdiectory under the currently selected directory.

The filter dropdrop can be used simply by changing the filter.

By double-clicking on a file in the listview you can open it directly into the Workbench editing area.

By right-clicking on a file in the listview you can select to open the file in the editor, delete the file, or refresh the fileview. Right clicking on a file also shows the following popup menus:

  • Open -- Opens the selected file in the editor.
  • Delete -- Deletes the selected file.
  • Refresh -- Refreshes the files under the directory.
  • Show Details -- Toggles the display of details of the files (Size, Modification Date).

By selecting the file with a single-click and then clicking again on the selected file you can rename the file.

Both current directory and filter settings are saved for the next session.

Currently these are the only supported functions of the file browser.


Snippets

The snippets window is comprised of two parts, the section dropdown and the list area.

When you click on the drop down tab of the section select you will see the following choices:
The section labels contain the section tag and then "::" followed by the section description. If you select "Add new section..." it will prompt you to add a new identifier and description to create a new section.

In the listing area you will see all current snippets for the selected section, to insert the snippet into the file you will want to position your cursor where you want the code snippet to be inserted (or alternatively you can select a piece of text and the snippet will replace the selected text) and then double-click on the snippet label.

When you right-click on the empty area of the Snippet list area and you have text selected in the editor pane the "Make snippet" menu choice will be enabled allowing you to insert the selected text as a snippet into the current section. | When you right-click on an existing snippet while having text selected in the editor pane you will see the "Remove" and "Replace" menu options enabled. Both actions will operate on the snippet under the mouse when the right-click was performed.

Make Snippet -- By selecting a block of text in the active editor and then right-clicking on a blank area of the Snippet list area you will be able to select "Insert" from the popup menu it will ask you for a label and then if the label does not conflict with an existing Snippet it will save the selected text into the currect section.

Replace -- By selecting a block of text in the active editor you can right-click on a current Snippet and choose "Replace" from the popup menu. It will ask you to confirm the replacement and if the user confirms the action then the selected Snippet text content will be replaced with the selected text from the active editor.

Remove -- By right-clicking on an item in the Snippet list area the user can select "Remove" from the popup menu and after asking for confirmation will remove the selected snippet from this section.

Extra features:

Within the text of the snippet you can embed to operators that will affect the cursor and/or text when the snippet is inserted.

"|" will tell the snippet where the cursor should be placed after the snippet is inserted, only the first symbol will be recognized, multiple inclusions of this symbol will be ignored.

"{$selected$}" can be used to make the snippet take selected text from the editor and replace it in the snippet then place the modified text back into place in the editor pane. For example:

Snippet Text in the Editor with selection Final text in the Editor
for($i=0 ; $i < | ; $i++) {
         {$selected$}
}
echo "<table>\n";
echo "<tr><td>&nbsp;</td></tr>\n";
echo "</table>\n";

echo "<table>\n";
for($i=0 ; $i < | ; $i++) {
       echo "<tr><td>&nbsp;</td></tr>\n";
}
echo "</table>\n";


Debugger

The debug module is a tool for parsing the current file through the debugging window at the bottom of the Code Editor. On clicking the [image] button, the debugging window opens under the code editor. It shows the Workbench opens a listener for port 9000. Afterwards, it executes php.exe or calls the URL when parsing via webserver. When a connection is made to port 9000 the message "Accepted connection from XDebug" is printed in the Debug::Output window. After initializing communications with the php process it halts on line 1.

Debugging Toolbar
 | Run - Start the current script and open the debugging port to accept the connection.
 | Stop - Kill the current debugging session and close the debug port.
 | Step Over - Process the current line and move to the next line in the current script, not stepping into any function calls.
 | Step Into - Follow the code into the current line's function call.
 | Step Out - Finish with the current scope and move to the scope above, jumping out of the current function call
 | Run to Cursor - It will start debugging from the current cursor position.

The debugger window has four panels to show the communication with the XDebug module, to show the local variables of the current scope, to show static watched variables, and to show stack trace.

The Output panel shows the following information, once a connection with the Xdebug module is established.

The Locals panel shows the variables that are defined in the current scope. When the script is just being started you will see all of the values being "NULL" as they are in the image above.

When a variable name represents an array or object in PHP it will be shown with the '+' symbol to the left which can be clicked on to open the member elements.

This is an example of an expanded array display.

In this panel you can add specific variables to follow throughout the execution of the script. Adding watched variables can be done through the menu item under the Debug menu.

The final tab in the debugging window is for the Stack Trace.

In order to make Xdebug run on your PHP script, the following code needs to be inserted in your php.ini file. This is to be inserted at the end of the php.ini file:

 [xdebug]
zend_extension_ts="C:\workbench\tools\php_xdebug.
.

xdebug.auto_trace = On
xdebug.collect_params = On
xdebug.default_enable = On
xdebug.remote_enable = On
xdebug.remote_handler = gdb
xdebug.remote_host = localhost
xdebug.remote_mode = req
xdebug.remote_port = 9000
xdebug.dump_once = On
xdebug.dump_undefined = On

zend_extension_ts may need to be changed in accordance with the path to php_xdebug.


Options

  • Editor
  • AutoComplete
  • Colors
  • External Browsers
  • FTP Servers
  • Modules
  • Multiview Panel
  • PHP Parsing
  • Server Settings
  • PHP Interpreter
  • Themes


CVS Manager

Options::CVS Manager

button -- Adds or create a new CVS Account. The newly created account name is added to the dropdown list on the left.

button -- Removes the currently selected account in the dropdown list on the left.

Authentication: -- This is a dropdown list, from where the user can select a proper protocol,i.e, local, pserver or ext(used for SSH or RSH) for CVS setup.

Server/IP: -- This is text box where the IP address or the host name of the server is set.

Port: -- This text box specifies the port number of the CVS server. To use the default port this can be left blank.

Repository: -- Contains the remote directory specification for the CVS repository

Username: -- Specifies the username to login to the server with.

Password: -- Use this text control to specify the matching password for the given user, not needed when using "local" or "ext" type connections.

Local Directory: -- Sets the local directory, where all the downloaded files or directories are saved or stored. The [image] button is used to browse through the directory to set the path.

CVS Binary: -- Specifies the path to the CVS binary. The [image] button is used to browse through the directories to set the path to the CVS application. If the binary is located in a directory specified by the PATH environment variable it is not necessary to include the full path to the binary, only the name of the executable.

To use SSH for connections to CVS:

There are some extra steps needed to use SSH to connect the CVS server. You will need to install an SSH client that supports command-line tunnels, for example our in-house development team uses OpenSSH available from http://www.openssh.org/portable.html (for Windows please go to http://sshwindows.sourceforge.net/)

Once the SSH client is installed you will need to add to the environment variables the following entry: CVS_RSH="path/to/ssh_binary"

Windows:
Right-click on "My Computer", select "Properties" from the menu.
Select the "Advanced" tab and then click on the button "Environment Variables"
Under "Environment variables for [username]" click on the button "New"
For the variable name enter "CVS_RSH"
For the value enter "C:\path\to\ssh.exe"
Click on "OK" to save the new variable
Continue clicking "OK" to exit all dialogs
Restart Workbench to re-read the environment

Linux:
Edit your ~/.bashrc file and add the following line
"export CVS_RSH=/path/to/ssh"
Save the file and re-login to have the X session read the new environment setup

Once these changes have been made to your environment you should be able to add your CVS accounts as type SSH and then when accessing the server a shell window will be created to allow you to enter your access password for the user specified.


Debugging

Options::Debugging

Port -- Sets the port, where the application communicates with Xdebug. If any other port is specified, the specified port number needs to be set in Xdebug configuration files.

When you change the port that Workbench will listen for you will also need to change the port specified either in your php.ini (xdebug.remote_port option) or in the environment variable "XDEBUG_CONFIG" where "remote_port=#"

Automatic Stack Trace: -- When this setting is set to on, the tracing of function calls will be enabled just before the script is run. This makes it possible to trace code. Checking this box turns on automatic Stack trace, unchecking it turns this feature off.

Dump Super Globals: -- Dumps Super Globals(variables)when the checkbox on its right is checked, not dumped , if left unchecked.

This setting controls which data from the superglobals is shown when an error situation occurs. Each php.ini setting can consist of a comma seperated list of variables from this superglobal to dump, but make sure you do not add spaces in this setting. In order to dump the REMOTE_ADDR and the REQUEST_METHOD when an error occurs, add this setting: xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD


Editor

Options::Editor

Presets -- The dropdown list will apply the settings relating to a particular editing environment, i.e, Delphi, MS Visual C++, UltraEdit32.

 | Delphi | MS Visual C++ (6.0) | UltraEdit32
Indentation Guides |  |  |
Show Line Nums | X | X | X
Word wrap |  |  |
Visual Brace Matching | X | X | X
Show Special Chars |  |  | X
Backspace Unindents | X | X | X
Tab Indentation |  | X | X

Indentation Guides -- Lets turn on the indentation guides, these are vertical dotted lines connecting the beginning of the indented block to the last line of the same block of indented code.

Show Line Nums -- Shows the line numbers in the gutter to the left of the editing area.

Word wrap -- Turns on automatic wordwrapping at the column specified by the Right Edge option.

Visual Brace Matching -- When the cursor is moved to the left of a blocking character (any of the set "{,},[,],(,)") it will underline and change the character of both the character to the right and it's matching character.

Show Special Chars -- Will show tabs and spaces as special graphical characters instead of leaving the area of the line blank.

Backspace Unindents -- When using spaces for indents using the backspace will automatically delete the block of spaces representing on indent level, with this feature turned off the backspace will only remove one space at a time.

Tab Indentation -- Use tab characters when making an automatic indentation, when turned off the appropriate number of spaces will be used instead.

Right Edge: -- Specifies the maximum number of characters for a line before wordwrapping is invoked. The default value is 80, but can be changed to suit the requirements. (This specifies where the light grey line will show up in the editing window)

Tab Width: -- Specifies the width of Tab. By default it is set to 4 spaces.

Font: -- Sets the font used by the editing window.

Font Size: -- Set the font size used by the editing window.


Auto Completion

Options::Auto Completion

New button -- This button is used to specify a new token name.A token is custom defined by the user in the text box specified below,that will be expanded when the hot-key (CTRL-J) is pressed in the editor. This feature is not dependant on the script that is currently being edited, it is not dependant on the namespace the cursor currently resides in, it is fully global in any file being edited.

Remove button -- A token , that is already defined can be selected from the dropdown list to its left and can be deleted.


Colors

Options::Colors

Scheme-- This dropdown list gives the user a choice of selecting any one of the defined schemes. Colors are set to a default the first time the program is run, and if no changes are made there will be no settings saved. Otherwise the user will be able to click on the Options dialog and select any system color available from the palette. Once changes are made the preferences will be saved.

Token-- Using the listbox to select the lexing token which style setting you want to change. Changes made to the style will be shown immediately in the example window below.

Bold toggle button-- Sets the attribute of the text to Bold, if checked.

Italic toggle button-- Sets the attribute of the text to Italic, if checked.

Underline toggle button-- Sets the attribute of the text to Underline, if checked.

Colors 4x4 panels-- Using the left button of the mouse selects the predefined foreground, using the right mouse button will select the color of the background. The text "FG" represents foreground, "BG" for background, and "FB" when the foreground and background are set to the same color. Color settings for either foreground or background which do not have an exact match are not shown in the color panels but will be shown in the text controls below as their hex RGB values.

Example-- Displays a text preview of the altered settings. This text is editable so you can try out your new settings before applying them. When switching schemes the example text will be reset.


External Browser

Options::External Browser

The user can select and activate any of the existing external browsers from the dropdown list to display the parsed output.

button-- Sets the option for the user to add a new external browser.

button-- Sets the option for the user to remove the selected browser from the dropdown list.

Name text box-- Allows the user to specify a browser name.

Program:-- Allows the user to specify a program required for the external browser.The [image] button allows to set a path to the program.

Arguments-- Arguments specify necessary arguments that the program may need to display a web page. If not sure, it should be left blank. Valid identifiers that are replaced by studio before the program is invoked are:

$filename$ - filename and path of the current file.
$file$ - filename without path.
$path - path without filename.


File Extensions

Options::File Extensions

New button-- Add new file type. The file extensions are specified in the text box below and seperated by ';'.

Remove button-- This is used to remove a particular file type.


General/Locale

Options::General/Locale

Menu/Dialog Language -- Specifies Menu/Dialog language either in en_US(English-United States) or de_DE(German language). It has to be chosen from the dropdown list.

PHP Helpfile Language -- Sets the language for PHP Helpfile. The user can set either en for English or de for German language.

Use automatic HTML code completion for tags checkbox -- Checking it enables the automatic HTML code completeion for tags, unchecking it turns this feature off.

Use automatic HTML code completion for attributes checkbox -- Checking it enables the automatic HTML code completeion for attributes, unchecking it turns it off.


Modules

Options::Modules

The modules section shows the list of modules that are installed with the workbench, toolkit modules installed are also shown here. Selecting a module will show the module information on the right side.

The module information shows the following

  • Name
  • Version
  • Creator
  • Description: Funtionality of the module


Multiview Panel

Options::Multiview Panel

The Multiview Panel is a tool window that can be either docked or floating on screen. By using the settings dialog panel you can select tools that are normally free-floating to be contained by the Multiview panel, these will be shown in a notebook panel with the tabs at the top of the window. By using the buttons in between the two list boxes you can choose the tools to be contained in the Multiview Panel. Currently after making changes to these settings a restart of Workbench is required

The list box on the left shows up the panels that are not docked. The list box on the right shows up all the panels that are docked.

Add All button-- Adds all the undocked panels to the docked one. The undocked panels in the available list will be added to the docked one.

Add button-- Lets the user select and add panel(s) selectively to the docked one.

Remove button-- Lets the user select and undock panel(s) selectively to the available list box.

Remove All button-- Lets the user undock all the panels. The undocked panels will be added to the available list box after their removal from the docked one.


PHP Parsing

Options::PHP Parsing

Calling the local PHP CGI Interpreter directly radio button -- This is set when php.exe is called directly. It is ideal for PHP Developers who do not want to run/have access to a web server.

Using an existing web server(local or remote) radio button -- Sets up web server, parses the script through the web server (local/remote). This is preferable, as it allows to display the exact output that your visitors will get if the release runs on the same/similar server.


Server Settings

Options::Server Settings

The Web server document root directory text box allows the user to set the root directory for the web server. Alternately the user can browse through the Browse button to select the webserver document root directory.

The Webserver root URL text box allows to set the URL to the web server.


PHP Interpreter

Options::PHP Interpreter


Remote Server

Options::Remote Server

button-- Adds new remote server account.

button-- Removes the selected remote server account.

Account Name: -- This text box reflects the name of the selected remote server account. This account name can not be changed , once the account is created.

Host: -- This text box dispalys the IP address or host name of the server.

Type: -- The type dropdown list specifies a particular server, i.e, FTP, SFTP or SCP.

Port: -- This text box specifies the port address for the remote server,i.e, it will be 21 in case of FTP, 22 In case of SFTP and so on. The connections of both SFTP and SCP are Transparent.

Username: -- The username is anonymous incase of FTP , but needs to be set in SFTP.

Password: -- This is blank, when the user is anonymous, but has to be specified when a user account name is specified.

Default dir: -- This text box always displays the default directory.

PSFTP Binary: -- This text box is set to the path of PSFTP.exe , in case of SFTP server. The [image] button is used to browse throgh the directory to set the path to PSFTP.exe. If the path to PSFTP is not set, at the time of creating the account, the account will not be functional.


Theme

Options::Theme

Theme:NoTB -- As the name says, no toolbars. For the hardcore coder, who does not want any clutter. The user can click on the Active hyperlink below to activate a particular theme.

Theme:Simple -- A rather simple but functional theme.Small icons are there and is easy to use.The user can click on the Active hyperlink below to activate a particular theme.

Theme:_default -- The default theme with a nice user interface. Best suited for most users.The user can click on the _default hyperlink below to activate a particular theme.


Other Features

Options::Other Features

This page currently contains no information


Class Wizard

This module is available only with the Toolkit.

The Class Wizard is a sophisticated tool for building classes as well as to declare variables, initialising variables, decfining functions, passing arguments to functions. The Classes, that are built using this wizard are invoked to the editor pane whenever necessary.

Add button -- It allows to create a class. The newly created class will be added to the dropdown on its left.

Delete -- It allows to delete an existing class. You can select the existing class from the dropdown and then clicking this button will remove it.

The list located below those above mentioned three buttons, displays a currently selected class from the dropdown and also lists all its members. Clicking a particular item shows its name in the Name text box.

The three buttons below the dropdown perform the following function:

The leftmost button (with the symbol +$) allows to create a variable within the created class. The variable name will always be preceeded by the symbol $.

The middle button (with the symbol +{}) allows to create a function within the created class.

The rightmost button (with the symbol -${}) allows to delete the class members, i.e, selected variables and functions in the list located below it.

The Arguments text box provides the ability to pass arguments to a function, selected from the list locatd on the extreme left.

The Value text box allows to specify a value for a variable, selected from the list on the left.

The PHPDoc text box provides the ability to add PHP comments, which is found to be extremely helpful for the developers.


CVS Manager

This module is available only with the Toolkit.

The CVS manager module provides a powerful and flexible User Interface to the CVS. The CVS is a version control system. Using it, you can record the history of your source files. This module provides all the features required to manage a version control system. It allows to add, update or commit modules, folders or files to the server. The CVS server is a repository to store the source code in a modular form.

The toolbar at the top of the CVS Manager has the following buttons (from left to right):

  • button -- Chooses an active CVS account. The text box below the toolbar displays the default directory, that was set up with the help of preferences dialog box (Tools-> Options). The list box below it displays the contents of the default directory. Changing the default directory to some other directory reflects the changes both in the text box as well as the list box. Double clicking a particular item changes the path and it show up in the text box below the toolbar and the corrresponding content is displayed in the list box.

  • button -- It moves to the default directory of the current CVS account.

  • button -- It allows to update folders or files and get copied from the CVS server to the local system.

  • button -- It allows to commit a particular module, a folder or a file to the CVS server.

  • button -- Adds a selected file to the CVS server.

  • button -- Removes a selected file from the CVS server.

  • button -- Moves one level up to the parent directory of the present working directory.

Right clicking on a partcular item displays the following popup menus:

Open popup menu allows you to select and open a particular folder, pertaining to a particular account.

Commit popup menu allows to commit a particular module, a folder or a file to the CVS server.

Remove popup menu removes a selected file from the CVS server.

Update allows to update folders or files and get copied from the CVS server to the local system.

Diff popup menu allows you to locate the difference of versions of a file (if the version of a file has been upgraded).

Log popup menu allows you to

Refresh popup menu allows to refresh the modules, folders and files included within a particular CVS account.


FTP Servers

Options::FTP Servers

The FTP Servers section allows you to add/remove/edit FTP accounts that can be used when click on the "Open from FTP" menu item under the File menu.

The "Server" is shown both in the drop-down at the top of the window and in the Server text control just below that drop-down control. If the machine does not have a valid DNS entry you can enter the IP address into this control.


PHP Interpreter

Options::PHP Interpreter

The PHP Interpreter.exe file path text box allows the user to enter the path to the php.exe, Alternately the user can browse to set the path to the php executable by clicking on the Browse button.

The path to the php executable is required by the application for parsing the output through PHP


Regular Expressions

Regular Expression

This module is available only with the Toolkit.

Regular Expressions are patterns used to process text. These patterns allow you to make a comparison between a pattern and a text string and then manipluate it.

There are two types of major regex syntax: POSIX and Perl (there are a few more syntaxes, but these are the two that are supported directly in PHP).

Regular expressions are used for complex string manipulation. PHP uses the POSIX extended and PERL regular expression. No external libraries are needed to build this extension.

The POSIX radio button -- It allows to select the POSIX syntax.

The PERL radio button -- It allows to select the POSIX syntax.

The example pattern is like: "^([a-zA-Z]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z]{2,3})$"

POSIX and PERL differ in the symbols used to represent sets of characters.Where in POSIX you would use the symbol "[:digit:]" to represent all numeric characters you would use "\d" in Perl.

This example is based on POSIX: "^" -- start matching from the beginning of the string "([a-zA-Z]+)" -- find at least one character or more that contain the characters "a to z" (lowercase) and/or "A-Z" (uppercase), store this subpattern in the matching register "@" -- match this character, no special significance "([a-zA-Z0-9\-]+)" -- same as the subpattern before, but also match with the digits 0 to 9 and the "-", again one or more characters must be found "\." -- explicitly match the ".", a period without the backslash can match any single character otherwise "([a-zA-Z]{2,3})" -- match a subpattern containing 2 or 3 characters in the alpha character set "$" -- match to the end of the string.

Perl is also enhanced to take special modifiers that will affect the way the match is made. POSIX finds the first match and then finishes, whereas Perl finds "all" the matches before it returns.

The Pattern: text box -- It allows to enter the pattern string.

The Test String: text box -- It allows to enter the string in which the pattern is searched.

The Result: text box -- It shows up the result upon clicking the Test button, whether the pattern matched the string or not.

The Copy button -- It allows to copy the pattern string onto the clipboard, which can be pasted on to the editor.

The alnum button -- It allows to enter the alphanumeric pattern string in the Pattern string text box.

The alpha button -- It allows to enter the alphabetic pattern string in the Pattern string text box.

The digit button -- It allows to enter the numeric pattern string (In case of POSIX it is[:digit:], whereas it is "\d" in PERL) in the Pattern string text box.

The white button -- It allows to enter the whitespace pattern string (In case of POSIX it is[:blank:], whereas it is "\s" in PERL)in the Pattern string text box.

Following are the tables of symbols for both POSIX and PERL:

POSIX
alnum | [:a-zA-Z0-9]
alpha | [:a-zA-Z]
digit | [:0-9]
white | [:" " ]
PERL
alnum | [a-zA-Z0-9]
alpha | [a-zA-Z]
digit | \d
white | \s


Remote Server

This module is available only with the Toolkit. This one is optional.

The Remote Browser panel is a utility for connecting to remote servers for performing all sort of file and directory operations ( browse, commit, update, save ,downloads, uploads etc).

Presently, two types of remote server are supported: FTP and SFTP

The toolbar at the top of the Remote Server has the following buttons (from left to right).

  • button -- Disconnects the current connections and shows all the remote server accounts.

  • button -- Moves one level up and displays the contents of the parent directory in the list box below.

  • button -- Saves the current file to the present working directory path.

  • button -- Makes a new directory under the present working directory.

  • button -- Deletes the selected file from the present working directory.

  • button -- Refreshes the present working directory display.

The text box below the toolbar displays (no connection), when there is no connection to the server. When connected , it dispays the present working directory of the currently connected server.

The list box shows all the remote server accounts when there is no connection. It lists all the files/folders of the present working directory once a connection is made.

Right clicking on a particular FTP or an SFTP account displays the following popup menus:

Open popup menu opens the currently selected FTP or SFTP account.

Delete popup menu allows to select and delete a particular FTP or SFTP account.

Rmdir popup menu allows to select a particular FTP or SFTP account and delete a directory under it.

Refresh popup menu refreshes a partcular FTP or SFTP account (projects, folders and files residing under it).

The status bar below shows the full account name of the currently connected server, once a connection is made e.g, "Connecting to...sftp://cvs/". During connection it displays "Connecting...".